<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>我要反馈</title>
    <link rel="stylesheet" href="/resources/css/amazeui.min.css" />
    <script src="/resources/js/jquery.min.js"></script>
    <link rel="stylesheet" href="/resources/css/amazeui.datetimepicker.css"/>
    <script src="/resources/js/amazeui.datetimepicker.js"></script>
    <script src="/resources/jsutlis/DateFormat.js"></script>

    <style type="text/css">
        #eye{
            position: relative;
            top:-30px;
            right:10px;
            float: right;
        }
        #eye2{
            position: relative;
            top:-30px;
            right:10px;
            float: right;
        }
    </style>
</head>
<body>
<!-- 顶部 -->
<div style="background-color:#82a6f5;height:7%;">
    <a href="/c/centre" target="_parent">
        <button style="background-color:rgba(255,255,255,0);border-radius:25px;border-color:white;margin-top:7px;margin-left:12px;">
            <b style="color:white;"><</b>
        </button>
    </a>
</div>
<!-- 中间 -->
<div id="center" style="width:100%;height:93%;" class="am-g">
    <form method="post" action="/feed/add" id="doc-vld-msg"  onsubmit="return toVaild()">
        <div class="am-form" data-am-validator>
            <fieldset>
                <legend>反馈信息</legend>
                <input type="hidden" name="userid" value="${sessionScope.user.id}">
                <input type="hidden" name="phone" value="${sessionScope.user.userTel}">
                <input type="hidden" name="username" value="${sessionScope.user.userName}">
                <div class="am-form-group">
                <label for="doc-ta-1">请输入</label>
                <textarea required class="am-form-field" name="details" rows="8" maxlength="100" id="doc-ta-1" placeholder="请输入反馈信息"></textarea>
                    <span id="msg-touser" style="color: red">${msg}</span>
            </div>

                <p><button class="am-btn am-btn-primary">提交</button></p>
            </fieldset>
        </div>
    </form>

</div>
</body>
<script>

    function toVaild() {
        var val = document.getElementById("doc-ta-1").value;
        if (val.replace(/^\s+|\s+$/g,"") == "" || val==null || val == undefined) {
            document.getElementById("msg-touser").innerText= "请填写反馈信息";
            return false;
        }
        else {
            return true;
        }
    }

</script>

</html>